{extend name="property/public/insidePageBase" /}
{block name="title"}添加企业{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <form class="layui-form   layui-form-pane">
            <div class="layui-form-item">
                <label class="layui-form-label">公 司 名 称</label>
                <div class="layui-input-block">
                    <input type="text" name="firm_name" placeholder="请输入公司名称" class="layui-input" lay-verify="required" autocomplete="off"/>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">营业执照号</label>
                <div class="layui-input-block">
                    <input type="text" name="license_no" placeholder="请输入营业执照号" class="layui-input" lay-verify="required" autocomplete="off"/>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">公司联系人</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" placeholder="请输入公司联系人" class="layui-input" lay-verify="required" autocomplete="off"/>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs6">
                    <div class="layui-form-item">
                        <label class="layui-form-label">联系人电话</label>
                        <div class="layui-input-block">
                            <input type="text" name="mobile" placeholder="请输入联系人电话" class="layui-input" lay-verify="required" autocomplete="off"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs7">
                    <div class="layui-form-item">
                        <label class="layui-form-label required">营业执照图</label>
                        <div class="layui-input-inline">
                            <input type="text" name="license_picture" placeholder="请上传营业执照图片" id="license_picture" class="layui-input">
                        </div>
                        <img class="checkPictureByImg license_picture" style="width: 40px;height: 40px;">
                        <div class="layui-input-inline layui-btn-container" style="width: auto;">
                            <button type="button" class="layui-btn layui-btn-primary uploadImg" lay-data="{field: 'license_picture',data:{dir:'firm/license', field:'license_picture'}}">
                                <i class="layui-icon">&#xe67c;</i>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs5">
                    <div class="layui-form-item layui-inline" pane="">
                        <label class="layui-form-label">是否显示</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="is_show" autocomplete="off" value="1" title="显示" checked>
                            <input type="radio" name="is_show" autocomplete="off" value="2" title="隐藏">
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea id="content" name="remark" placeholder="请输入备注说明" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <button class="layui-btn" type="button" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use([ 'form'], function () {
        var form = layui.form,$ = layui.$;
        $('.uploadImg').selectImages({
            confirm:function(res,elem,data) {
                $('#' + data.field).val(res[0].src);
                $('.' + data.field).attr('src',res[0].src)
            }
        });
    });
</script>
{/block}